<?php
include_once ('db_manage.php');
$travelname = $_GET ['value'];
$sql = "select id from pcd_travel where title = '" . $travelname . "' and fid = id";
$result = mysql_query ( $sql );
$travelid = 0;
while ( ($rs = mysql_fetch_object ( $result )) != false ) {
	$travelid = $rs->id;
	$travelid = $travelid . '_play';
}

if ($travelid == 0) {
	$sql = "select id from pcd_travel where title = '" . $travelname . "' and fid <> id";	
	$result = mysql_query ( $sql );
	while ( ($rs = mysql_fetch_object ( $result )) != false ) {
		$travelid = $rs->id;
	}
	if ($travelid != 0) {
		$travelid = $travelid . '_scence';
	}
}

echo $travelid;
?>